<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
this is admin home
<a href="/logout">注销</a>

<div sec:authorize="hasRole('ROLE_admin')">
    <h1>this is admin role</h1>
</div>
<hr/>
<div sec:authorize="hasRole('ROLE_user')">
    <h1>this is user role</h1>
</div>
</body>
</html>